int numOfRows = 10;
int numOfColumns = 10;
int screenWidth = 1000;
int screenHeight = 1000;
float diameter = screenWidth/numOfColumns;
int weight = 10;

Ring [][] ringGrid = new Ring[numOfRows][numOfColumns];
color[] colors = {#0099FF, #000000, #FF0000, #FFFF00, #33CC33};

void setup () {
  size (screenWidth, screenHeight);
  background (#C0C0C0);
  for (int row=0; row < numOfRows; row ++) {
    for (int column=0; column < numOfColumns; column++) {
      float x = diameter*column + diameter/2;
      float y = diameter*row + diameter/2;
      color c = colors[(column+row)%5];
      ringGrid[row][column] = new Ring (x, y, diameter-weight, weight, c);
    }
  }
}

void draw() {
  background (#9000FF);
  for (int row=0; row < numOfRows; row ++) {
    for (int column=0; column < numOfColumns; column++) {
      if ( row > 2 && row<6 || column>1 && column<5) {
        
        
        ringGrid[row][column].display();
      }
    }
  }
}
  

class Ring {
  float centerX, centerY;
  float diameter;
  int weight;
  color ringColor;
  
  Ring (float x, float y, float d, int w, color cl) {
    centerX = x;
    centerY = y;
    diameter = d;
    weight = w;
    ringColor = cl;
  }
  
  void display() {
    noFill();
    strokeWeight(weight);
    stroke(ringColor);
    ellipse(centerX, centerY, diameter, diameter);
  }
}
